const state = {
  province: [],
  city: [],
  area:[]
};

const mutations = {
  SETPRO(state, data) {
    state.province = data;
  },
  SETCITY(state, data) {
    state.city = data;
  },
  SETAREA(state, data) {
    state.area = data;
  }
};

const actions = {
  setPro({ commit }, data) {
    commit("SETPRO", data);
  },
  setCity({ commit }, data) {
    commit("SETCITY", data);
  },
  setArea({ commit }, data) {
    commit("SETAREA", data);
  }
};

export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters: {
    province: state => state.province,
    city: state => state.city,
    area: state => state.area,
  }
};
